<?php

namespace App\Services\Other\Models;



use App\Services\Business\Models\Attach;
use App\Services\Business\Models\Category;
use App\Services\Business\Models\DoubtResource;
use App\Services\Member\Models\User;
use App\Services\Other\Models\Product;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;

class Channel extends Model {

    use HasFactory;
    protected $table = 'channel';
    protected $fillable = [
        'title','type','user_id','thumb','is_show'
    ];




    public function user()
    {
        return $this->belongsTo(User::class, 'user_id','id');
    }
    public function fragments()
    {
        return $this->hasMany(ChannelFragment::class, 'channel_id');
    }










}